<div class="container">
    <div class="search">
        <form nz-form nzLayout="inline">
            <nz-form-item>
                <nz-form-label>部门名称</nz-form-label>
                <nz-form-control class="search-field">
                    <input nz-input placeholder="请输入部门名称" name="deptName">
                </nz-form-control>
            </nz-form-item>
            <nz-form-item>
                <nz-form-label>状态</nz-form-label>
                <nz-form-control class="search-field">
                    <nz-select name="status" nzPlaceHolder="请选择状态">
                        <nz-option nzValue="0" nzLabel="正常"></nz-option>
                        <nz-option nzValue="1" nzLabel="停用"></nz-option>
                    </nz-select>
                </nz-form-control>
            </nz-form-item>
            <nz-form-item>
                <nz-form-control>
                    <nz-space>
                        <button *nzSpaceItem nz-button [nzType]="'primary'"><span nz-icon
                                nzType="search"></span>搜索</button>
                        <button *nzSpaceItem nz-button><span nz-icon nzType="redo"></span>重置</button>
                    </nz-space>
                </nz-form-control>
            </nz-form-item>
        </form>
    </div>
    <div class="table">
        <div class="opts">
            <nz-space>
                <button *nzSpaceItem nz-button nzType="primary"> <span nz-icon nzType="plus"></span>新增</button>
                <button *nzSpaceItem nz-button> <span nz-icon nzType="swap"></span>展开/折叠</button>
            </nz-space>
        </div>
        <nz-table #basicTable [nzData]="deptData" [nzLoading]="loading">
            <thead>
                <tr>
                    <th id="deptName" [nzAlign]="'center'">部门名称</th>
                    <th id="orderNum" [nzAlign]="'center'">排序</th>
                    <th id="status" [nzAlign]="'center'">状态</th>
                    <th id="createTime" [nzAlign]="'center'">创建时间</th>
                    <th id="action" [nzAlign]="'center'">操作</th>
                </tr>
            </thead>
            <tbody>
                @for (item of basicTable.data; track item.id) {
                <tr>
                    <td [nzAlign]="'center'">{{item.deptName}}</td>
                    <td [nzAlign]="'center'">{{item.orderNum}}</td>
                    <td [nzAlign]="'center'">{{item.status==0?'正常':'停用'}}</td>
                    <td [nzAlign]="'center'">{{item.createTime}}</td>
                    <td [nzAlign]="'center'">
                        <a>编辑</a>
                        <nz-divider nzType="vertical"></nz-divider>
                        <a>删除</a>
                    </td>
                </tr>
                }

            </tbody>
        </nz-table>
    </div>
</div>